#pragma once
#include <iostream>

class Node
{

protected:	
	int weight; 
	/*int order;	*/
	Node* parent;
	int symbol;
	//Node* leftSibling;
	//Node* rigthSibling;

public:	
	//Node(int weight, int order);

	Node(const int w) : weight(w) { parent = NULL; }		
	Node(const Node &node) { weight = node.weight; parent = node.parent; }
	bool operator < (const Node &other) const {	return weight > other.weight; }

	void setSymbol(int symbol);
	int getSymbol();

	virtual void setWeight(int weight);
	virtual int getWeight() const;

	//virtual void setOrder(int order);
	//virtual int getOrder() const;

	virtual void setParent(Node* parent);
	virtual Node* getParent() const;

	virtual void incrementWeight();
	/*virtual void swapData(Node* otherNode);*/

	//virtual void setLeftSibling(Node* parent);
	//virtual Node* getLeftSibling() const;

	//virtual void setRigthSibling(Node* parent);
	//virtual Node* getRigthSibling() const;

	// abstract members
	virtual Node* getLeft() =0;
	virtual Node* getRight() =0;
	virtual bool isLeaf() =0;
};

